package org.aeon.gamechatnest.service;

import org.aeon.gamechatnest.dto.AuthoritySearchDto;
import org.aeon.gamechatnest.dto.AuthorityVo;
import org.aeon.gamechatnest.pojo.Role;

import java.util.List;

/**
 * @author: MissingAeon
 * @date: 2024/5/10 18:05
 * @description: 权限服务
 */
public interface AuthorityService {
    /**
     * 根据角色列表获取权限代码列表
     *
     * @param roles
     * @return
     */
    List<String> findAuthoritiesCodeByRoleIds(List<Role> roles);

    /**
     * 根据查询条件获取权限列表
     *
     * @param authoritySearchDto
     * @return
     */
    List<AuthorityVo> find(AuthoritySearchDto authoritySearchDto);


    /**
     * 获取一个角色的所有权限
     *
     * @param roleId
     * @return
     */
    List<AuthorityVo> findAuthorityByRoleId(Long roleId);

}
